<?php
namespace app\common\validate;
use think\Validate;
class BisAccount extends Validate {
    protected $rule = [
        ['id','number'],
        ['usernamename','require|max:50','用户名必须填写|用户名不能超过50个字符'],
        ['password','require','密码必须填写'],
        ['repassword','require','确认密码必须填写'],
        ['bis_id','number'],
        ['status','number|in:-1,0,1','状态必须是数字|状态范围不合法'],
        ['bis_id','number'],
    ];

    // 场景设置
    protected  $scene = [
        'add' => ['id', 'username', 'password','bis_id'],
        'update' => ['id', 'username', 'password','repassword','bis_id'],
        'status' =>['id','status'],
    ];
}